<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="https://img0.baidu.com/it/u=2866200409,4132400541&fm=253&fmt=auto&app=120&f=JPEG?w=450&h=780" alt="">
    <script>
        window.onload = function() {
            // DOM和图片或者其他资源css...加载完毕之后才会执行
            console.log("页面加载完毕")
        }

        document.addEventListener('DOMContentLoaded',function(){
            // 只有DOM元素加载完毕就会执行。
            console.log("DOM加载完毕")
        });

        // $(document).ready()

       

        // window.addEventListener("DOMContendLoade")

        window.onresize = function() {
            console.log("onresize 窗口发生变化")
        }
    </script>
</body>
</html>